﻿/******************************************************************************
 * Copyright 2022-2032 ImperialVision Co., Ltd.
 * All right reserved. See COPYRIGHT for detailed Information.
 *
 * @file    SpinBox.h
 * @brief   整型类型的SpinBox,防止鼠标在控件上方（未点击）时，响应滚轮滚动事件
 * @usage   1)Qt Designer创建一个QSpinBox然后提升，
 *          2)代码动态创建一个SpinBox实例
 *
 * @author  linxiaohao<linxiaohao@imperial-vision.com>
 * @date    2022/12/22
 *****************************************************************************/
#ifndef SPINBOX_H
#define SPINBOX_H

#include <QObject>
#include <QSpinBox>

class SpinBox : public QSpinBox{
    Q_OBJECT
public:
    SpinBox(QWidget *parent = 0) ;

    // QWidget interface
protected:
    virtual void wheelEvent(QWheelEvent *event) override;
    virtual void mousePressEvent(QMouseEvent *event) override;

signals:
    void send_data(QString objName, QString data);
};

#endif // SPINBOX_H
